package com.lin.blog.service;

import com.lin.blog.entity.UserLike;

import java.util.List;

public interface IUserLikedRedisService {

    /**
     * 点赞 状态为1
     * @param likedUserId
     * @param likedArticleId
     */
    public void saveLiked2Redis(Long likedUserId, Long likedArticleId);

    /**
     * 取消点赞 状态为0
     * @param likedUserId
     * @param likedArticleId
     */
    public void unlikeFromRedis(Long likedUserId, Long likedArticleId);


    /**
     * 从Redis中获取点赞数据
     * @return
     */
    public List<UserLike> getLikedDataFromRedis();



    /**
     * 生成UserLike Key
     * @param likedUserId
     * @param likedArticleId
     * @return
     */
    public String generateLikedKey(Long likedUserId, Long likedArticleId);
}
